<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var arr = [75,9,9,6,8,7,57,636,389,96,86,77,37,25,23];
        var maxValue = arr[0];
        var minValue = arr[0];
        var maxIndex = 0;
        var minIndex = 0;
        for (var i = 1; i < arr.length; i++) {
            if (arr[i] > maxValue) {
                maxValue = arr[i];
                maxIndex = i;

            }
            if (arr[i] < minValue) {
                minValue = arr[i];
                minIndex = i;
            }

        }
        console.log("最大值是" + maxValue + "，下标是" + maxIndex);
        console.log("最小值是" + minValue + "，下标是" + minIndex);
    </script>
</head>

<body>

</body>

</html>